!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React"),require("lodash"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","_","ReactDOM"],e):"object"==typeof exports?exports["storm-react-diagrams"]=e(require("React"),require("lodash"),require("ReactDOM")):t["storm-react-diagrams"]=e(t.React,t._,t.ReactDOM)}(this,function(t,e,n){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=35)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(4),r=n(1),s=function(t){function e(){var e=t.call(this)||this;return e.selected=!1,e}return o(e,t),e.prototype.deSerialize=function(e){t.prototype.deSerialize.call(this,e),this.selected=e.selected},e.prototype.serialize=function(){return r.merge(t.prototype.serialize.call(this),{_class:this.constructor.name,selected:this.selected})},e.prototype.getID=function(){return this.id},e.prototype.isSelected=function(){return this.selected},e.prototype.setSelected=function(t){this.selected=t,this.itterateListeners(function(t){t.selectionChanged&&t.selectionChanged()})},e.prototype.remove=function(){console.log("removing: ",this),this.itterateListeners(function(t){t.entityRemoved&&t.entityRemoved()})},e}(i.BaseEntity);e.BaseModel=s;var a=function(t){function e(e,n){var o=t.call(this)||this;return o.x=n.x,o.y=n.y,o.link=e,o}return o(e,t),e.prototype.deSerialize=function(e){t.prototype.deSerialize.call(this,e),this.x=e.x,this.y=e.y},e.prototype.serialize=function(){return r.merge(t.prototype.serialize.call(this),{x:this.x,y:this.y})},e.prototype.remove=function(){t.prototype.remove.call(this),this.link&&this.link.removePoint(this)},e.prototype.updateLocation=function(t){this.x=t.x,this.y=t.y},e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.getLink=function(){return this.link},e}(s);e.PointModel=a;var c=function(t){function e(){var e=t.call(this)||this;return e.linkType="default",e.points=[new a(e,{x:0,y:0}),new a(e,{x:0,y:0})],e.extras={},e.sourcePort=null,e.targetPort=null,e}return o(e,t),e.prototype.deSerialize=function(e){var n=this;t.prototype.deSerialize.call(this,e),this.linkType=e.type,this.points=r.map(e.points,function(t){var e=new a(n,{x:t.x,y:t.y});return e.deSerialize(t),e})},e.prototype.serialize=function(){return r.merge(t.prototype.serialize.call(this),{type:this.linkType,source:this.sourcePort?this.sourcePort.getParent().id:null,sourcePort:this.sourcePort?this.sourcePort.id:null,target:this.targetPort?this.targetPort.getParent().id:null,targetPort:this.targetPort?this.targetPort.id:null,points:r.map(this.points,function(t){return t.serialize()}),extras:this.extras})},e.prototype.remove=function(){t.prototype.remove.call(this),this.sourcePort&&this.sourcePort.removeLink(this),this.targetPort&&this.targetPort.removeLink(this)},e.prototype.isLastPoint=function(t){var e=this.getPointIndex(t);return e===this.points.length-1},e.prototype.getPointIndex=function(t){return this.points.indexOf(t)},e.prototype.getPointModel=function(t){for(var e=0;ea.x&&(s=e[1],a=e[0]),n.push(this.generateLink({id:0,onMouseDown:function(e){if(!e.shiftKey){var n=new r.PointModel(t.props.link,t.props.diagramEngine.getRelativeMousePoint(e));n.setSelected(!0),t.forceUpdate(),t.props.link.addPoint(n,1),t.props.pointAdded(n,e)}},d:" M"+s.x+" "+s.y+" C"+(s.x+o)+" "+s.y+" "+(a.x-o)+" "+a.y+" "+a.x+" "+a.y})),null===this.props.link.targetPort&&n.push(this.generatePoint(1))}else{var c=[];if(this.props.smooth){c.push(" M"+e[0].x+" "+e[0].y+" C "+(e[0].x+50)+" "+e[0].y+" "+e[1].x+" "+e[1].y+" "+e[1].x+" "+e[1].y);for(var p=1;p*{border-color:#00c0ff!important;-webkit-filter:drop-shadow(0 0 20px rgba(0,192,255,.5))}@keyframes dash{0%{stroke-dashoffset:24}to{stroke-dashoffset:0}}.storm-diagrams-canvas path{fill:none;pointer-events:all}.storm-diagrams-canvas path.selected{stroke:#00c0ff!important;stroke-dasharray:10,2;animation:dash 1s linear infinite}.storm-diagrams-canvas .port{width:15px;height:15px;background:hsla(0,0%,100%,.1)}.storm-diagrams-canvas .port.selected,.storm-diagrams-canvas .port:hover{background:#c0ff00}.storm-diagrams-canvas .basic-node{background-color:#1e1e1e;border-radius:5px;font-family:Arial;color:#fff;border:2px solid #000;overflow:visible;font-size:11px;box-shadow:0 0 10px rgba(0,0,0,.5)}.storm-diagrams-canvas .basic-node .title{background:rgba(0,0,0,.3);display:flex;white-space:nowrap}.storm-diagrams-canvas .basic-node .title>*{align-self:center}.storm-diagrams-canvas .basic-node .title .fa{padding:5px;opacity:.2;cursor:pointer}.storm-diagrams-canvas .basic-node .title .fa:hover{opacity:1}.storm-diagrams-canvas .basic-node .title .name{flex-grow:1;padding:5px}.storm-diagrams-canvas .basic-node .ports{display:flex;background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.2))}.storm-diagrams-canvas .basic-node .ports .in,.storm-diagrams-canvas .basic-node .ports .out{flex-grow:1;display:flex;flex-direction:column}.storm-diagrams-canvas .basic-node .ports .in-port,.storm-diagrams-canvas .basic-node .ports .out-port{display:flex;margin-top:1px}.storm-diagrams-canvas .basic-node .ports .in-port>*,.storm-diagrams-canvas .basic-node .ports .out-port>*{align-self:center}.storm-diagrams-canvas .basic-node .ports .in-port .name,.storm-diagrams-canvas .basic-node .ports .out-port .name{padding:0 5px}.storm-diagrams-canvas .basic-node .ports .out-port{justify-content:flex-end}.storm-diagrams-canvas .basic-node .ports .out-port .name{justify-content:flex-end;text-align:right}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&v.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function a(t){var e=document.createElement("link");return e.rel="stylesheet",i(t,e),e}function c(t,e){var n,o,i;if(e.singleton){var c=m++;n=y||(y=s(e)),o=p.bind(null,n,c,!1),i=p.bind(null,n,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=a(e),o=u.bind(null,n),i=function(){r(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),o=l.bind(null,n),i=function(){r(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}function p(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=x(e,i);else{var r=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function l(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function u(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var d={},f=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},h=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=f(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,m=0,v=[];t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},"undefined"==typeof e.singleton&&(e.singleton=h()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var i=o(t);return n(i,e),function(t){for(var r=[],s=0;sthis.mouseX&&(t+n.getOffsetX())*othis.mouseY&&(e+n.getOffsetY())*o